|
Repetier-Firmware
1.0.0
|
#include <Communication.h>
Public Member Functions | |
| GCodeSource () | |
| virtual | ~GCodeSource () |
| virtual bool | isOpen ()=0 |
| virtual bool | supportsWrite ()=0 |
| true if write is a non dummy function More... | |
| virtual bool | closeOnError ()=0 |
| virtual bool | dataAvailable ()=0 |
| virtual int | readByte ()=0 |
| virtual void | close ()=0 |
| virtual void | writeByte (uint8_t byte)=0 |
Static Public Member Functions | |
| static void | registerSource (GCodeSource *newSource) |
| static void | removeSource (GCodeSource *delSource) |
| static void | rotateSource () |
| Move active to next source. More... | |
| static void | writeToAll (uint8_t byte) |
| Write to all listening sources. More... | |
| static void | printAllFLN (FSTRINGPARAM(text)) |
| static void | printAllFLN (FSTRINGPARAM(text), int32_t v) |
Public Attributes | |
| uint32_t | lastLineNumber |
| uint8_t | wasLastCommandReceivedAsBinary |
| Was the last successful command in binary mode? More... | |
| millis_t | timeOfLastDataPacket |
| int8_t | waitingForResend |
| Waiting for line to be resend. -1 = no wait. More... | |
Static Public Attributes | |
| static GCodeSource * | activeSource = &serial0Source |
Static Private Attributes | |
| static fast8_t | numSources = 2 |
| Number of data sources available. More... | |
| static fast8_t | numWriteSources = 2 |
| static GCodeSource * | sources [MAX_DATA_SOURCES] = {&serial0Source,&serial1Source} |
| static GCodeSource * | writeableSources [MAX_DATA_SOURCES] = {&serial0Source,&serial1Source} |
This class defines the general interface to handle gcode communication with the firmware. This allows it to connect to different data sources and handle them all inside the same data structure. If several readers are active, the first one sending a byte pauses all other inputs until the command is complete. Only then the next reader will be queried. New queries are started in round robin fashion so every channel gets the same chance to send commands.
Available source types are:
| GCodeSource::GCodeSource | ( | ) |
|
inlinevirtual |
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
static |
|
static |
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
static |
|
static |
|
static |
Move active to next source.
< Move active to next source
|
pure virtual |
true if write is a non dummy function
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
pure virtual |
Implemented in FlashGCodeSource, and SerialGCodeSource.
|
static |
Write to all listening sources.
< Write to all listening sources
|
static |
| uint32_t GCodeSource::lastLineNumber |
|
staticprivate |
Number of data sources available.
|
staticprivate |
|
staticprivate |
| millis_t GCodeSource::timeOfLastDataPacket |
| int8_t GCodeSource::waitingForResend |
Waiting for line to be resend. -1 = no wait.
| uint8_t GCodeSource::wasLastCommandReceivedAsBinary |
Was the last successful command in binary mode?
|
staticprivate |